=== Krause AI Site Agent ===
Contributors: krause0312
Tags: artificial intelligence, site management, gutenberg, rollback, automation
Requires at least: 6.9
Tested up to: 7.1
Requires PHP: 8.0
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Give AI the context of your WordPress site, then validate, preview, apply and roll back approved changes with administrator control.

== Description ==

**Work with AI on your WordPress site, without handing it the keys.**

Krause AI Site Agent helps you turn suggestions from your chosen AI assistant into a **reviewable, administrator-controlled workflow**. Export the relevant site context, ask an AI to prepare a compatible response package, preview what would change, and decide whether to apply it. You remain in control of each step.

**How it works**

1. Describe the WordPress change you want to make.
2. Create and download a Context ZIP with the plugin's task instructions and selected site information.
3. Review the archive for private data, then share it manually with an AI assistant of your choice.
4. Ask the AI to return a Response ZIP following the included package contract.
5. Upload the Response ZIP to WordPress. AI Site Agent checks its structure, integrity, permissions and site context, and presents a preview.
6. Explicitly approve supported changes. Check History and use the available rollback/recovery tools if needed.

**What you can do**

* Prepare context for AI-assisted site editing, without copying your site structure by hand.
* Review proposed changes to supported WordPress content, Gutenberg blocks, navigation, Site Editor templates/template parts, styles, media and selected settings.
* Import supported declarative Response ZIP operations and manage CSS-only modules.
* Inspect a preview before applying a compatible package.
* Use background context export, progress tracking, diagnostics, transaction History, recovery and conflict-aware rollback.
* Control what is included in exported context with privacy and package-inspection tools.

**Designed around control and safety**

AI Site Agent Free does not connect to an AI provider on its own, requires no plugin AI API key, and does not send a Context ZIP to a third party. AI-generated packages are treated as untrusted input and checked before application. Changes require explicit administrator approval. Backups and rollback information support recovery, but an undo may be blocked when the live site conflicts with the saved state.

**Important limits:** It is not a direct AI chat service and cannot execute arbitrary AI code. User- or AI-supplied PHP/JavaScript runtime modules are not accepted in this WordPress.org edition. The plugin does not directly modify WordPress core, theme source files or third-party plugin source files. Protocol v1 packages support import, validation and preview; apply-capable responses use the supported `ai-site-agent/v2` format. A random ZIP generated by an AI will not necessarily be a valid Response ZIP.

The WordPress.org Free edition contains no commercial license runtime, Direct AI transport, telemetry, external updater or hidden Pro unlock. The separately distributed Pro edition is not included.

**Source and build:** Shipped JavaScript and CSS are human-readable runtime sources and do not require minification or compilation. See `DEVELOPMENT.md` for build notes.

== External services ==

The core Free workflow does not contact an external AI provider. The administrator downloads the Context ZIP and independently decides where to send it.

The plugin does not include telemetry or a vendor-hosted update client in the WordPress.org edition. Updates for this edition are provided through WordPress.org.

This readme includes an optional product-information link for the separately distributed Pro product:
https://alexander-krause.ru/ai-site-agent-pro/

The plugin can make authenticated HTTP requests back to the current WordPress site for protected loopback, render and health checks. These requests target the same WordPress installation rather than a third-party tracking or AI service.

No site content, credentials, archive data, diagnostics, or usage telemetry are sent by the plugin to alexander-krause.ru or to any AI vendor. The product-information URL above is documentation only; the plugin runtime does not request it. URLs stored inside Context ZIP metadata are data describing the current site, not network service endpoints used by the plugin.

Support reports are prepared locally as ZIP files. The WordPress.org edition does not automatically email or upload support reports; the administrator downloads the ZIP and decides whether to attach it to an email manually.

== Installation ==

1. Install Krause AI Site Agent and activate it. It requires WordPress 6.9+ and PHP 8.0+.
2. Open **AI Site Agent** in wp-admin and complete the first-run setup wizard. Run the compatibility diagnostics and review privacy/recovery options.
3. Make a separate backup of your site before testing any change.
4. Describe your task and choose the action to prepare a Context ZIP for the AI.
5. Download the Context ZIP, inspect what it contains, then manually give it to the AI assistant you choose. Ask for a contract-compliant Response ZIP.
6. Upload the Response ZIP in AI Site Agent. Read the validation report and preview carefully.
7. Explicitly approve and apply only changes you understand. Inspect the result on your site.
8. Use History and recovery/rollback where supported if changes need attention.

For examples, package-format limitations and troubleshooting, see the WordPress admin interface and the instructions provided inside the exported Context ZIP.

== Frequently Asked Questions ==

= Does the Free edition require a license key? =

No. The WordPress.org Free edition has no commercial licensing runtime and does not require a license key.

= Does the plugin automatically send my site to ChatGPT or another AI service? =

No. The Free workflow is manual. The plugin prepares the Context ZIP locally. You decide where to send it and later upload the returned Response ZIP yourself.

= Can an AI response install PHP or JavaScript code? =

Not in the WordPress.org Free edition. Response packages are limited to supported declarative WordPress operations and CSS-only managed modules. User- or AI-supplied PHP/JavaScript runtime modules and runtime callbacks are rejected.

= Can it work with Gutenberg and Site Editor content? =

Yes. Supported declarative operations cover Gutenberg content and blocks, navigation, templates/template parts, styles, media and selected WordPress settings.

= What happens before a response package changes the site? =

The package is quarantined and validated, then the plugin prepares a preview and requires explicit administrator confirmation before supported mutations are applied.

= Can I undo a change? =

AI Site Agent keeps History and rollback/recovery data for supported operations. Rollback is conflict-aware and can report when the current site state no longer matches the stored rollback assumptions.

= How are Context ZIP files handled? =

A completed current Context ZIP can be downloaded repeatedly. Starting a newer Context Export supersedes the previous current export. The current context binding is not invalidated merely because a short download timer elapsed.

= How does this edition update? =

Through the standard WordPress.org plugin update mechanism. The WordPress.org package does not contain the AI Site Agent external updater.

= Why is payload/content/page.html rejected? =

Executable or unsupported file extensions are rejected before extraction. For page content payloads, the compatible package contract uses UTF-8 `.txt` rather than `.html` in the ZIP; the manifest and hashes must also match. Follow the instructions bundled with your current Context ZIP, rather than simply renaming files in an existing response.

= Is there a Pro version? =

Yes. Pro is a separately distributed product available from https://alexander-krause.ru/ai-site-agent-pro/. It is not bundled in this plugin and cannot be unlocked from hidden code inside the WordPress.org package.

== Privacy ==

AI Site Agent Free does not automatically transmit the generated Context ZIP to an AI provider. The administrator manually decides whether and where to share it.

Context Export includes privacy controls and package inspection intended to reduce unintended sensitive data exposure. Files explicitly attached by the administrator remain under that administrator's decision. Review a generated Context ZIP before sharing it with any external service.

The WordPress.org Free edition contains no telemetry transport.

== Changelog ==

= 1.0.0 =
* First public WordPress.org Free release.
* Manual Context ZIP and Response ZIP workflow with package validation, preview and explicit approvals.
* Supported WordPress/Gutenberg declarative operations and CSS-only modules.
* Background context export, diagnostics, History, recovery and conflict-aware rollback.
* Privacy controls, site-context binding and restricted response-file types.
* Standard WordPress.org updates; no telemetry, commercial licensing or external updater included.
