=== Sectioneer ===
Contributors: khokansardar
Tags: full-site-editing, blocks, patterns, sections, ai
Requires at least: 6.7
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 0.1.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

An extensible page-building layer for the block editor: curated, theme-aware sections with optional AI generation, inside Gutenberg and FSE.

== Description ==

Sectioneer adds a curated, theme-aware page-building experience to the WordPress
block editor — a section library, one-click insert, and optional AI section
generation and editing. It is built entirely on WordPress's public extension
points (SlotFills, block filters, the command palette, the Abilities API and the
WordPress AI Client), so it installs as an ordinary plugin and keeps working across
core upgrades. It never forks core or replaces the editor.

Open any page or post (or the Site Editor), click the **Sectioneer** icon in the
top-right toolbar, and the **Sections** panel appears.

= Features =

* **Section library** — ready-made sections (hero, features, call to action, and
  more) with search and one-click insert.
* **Theme-aware insert** — inserted sections adopt the active theme: raw colors are
  remapped to the nearest theme.json palette token, so sections never look "pasted in".
* **AI section generation (optional)** — describe a section in plain language and
  Sectioneer generates valid block markup for it, seeded with your theme's design
  tokens. Select a block first to revise it in place instead of inserting a new one.
* **Safe by construction** — all inserted markup (curated or AI-generated) is parsed
  and rebuilt against registered block types; unregistered or unsafe blocks are dropped.
* **One consistent home** — every feature lives in a single Sectioneer editor sidebar,
  in both the post editor and the Site Editor, with a first-run guide so it's easy to find.

The curated section library works on its own. AI generation is an optional
enhancement that degrades gracefully when no AI provider is configured.

= AI section generation and external services =

Sectioneer does **not** bundle any AI provider, contain any API keys, or make any
external requests on its own. It registers a WordPress Ability and calls it through
the **WordPress AI Client**; the underlying provider is resolved on your own site.

To enable AI generation you install and configure a separate WordPress AI provider
plugin (for example *AI Provider for Google*, *AI Provider for OpenAI*, or *AI
Provider for Anthropic*) and supply that provider's API key. When — and only when —
you click "Generate"/"Update", your prompt text and the slugs of your active theme's
design tokens (color and font-size names) are sent to whichever AI provider **you**
configured, via the AI Client running on your site, and the generated block markup is
returned. That request is governed by the terms and privacy policy of the AI provider
you chose. If no provider is configured, Sectioneer shows a notice and the AI controls
are disabled — nothing is sent anywhere.

== Installation ==

1. Install and activate **Sectioneer** from the Plugins screen (or upload the ZIP).
2. Open a page or post in the editor, or open the Site Editor.
3. Click the **Sectioneer** icon (the layout icon) in the top-right toolbar to open
   the **Sections** panel. A short guide appears the first time.
4. *(Optional, for AI)* Install and activate a WordPress AI provider plugin and add
   its API key, then use the "Generate with AI" field in the Sections panel.

== Frequently Asked Questions ==

= Where do I find Sectioneer after activating it? =

Inside the editor. Open any page or post (or the Site Editor) and click the
Sectioneer (layout) icon in the top-right toolbar to open the Sections panel. After
activation a welcome notice in wp-admin links you straight there, and a one-time
guide appears the first time you open an editor. You can reopen the guide any time
from the "How Sectioneer works" link in the panel.

= Do I need an AI service to use Sectioneer? =

No. The curated section library and theme-aware insert work without any AI provider.
AI generation and in-place editing are optional.

= How do I enable AI generation? =

Install and activate a WordPress AI provider plugin that registers with the WordPress
AI Client (for example AI Provider for Google, OpenAI, or Anthropic) and add your API
key per that plugin's instructions. Sectioneer is provider-agnostic and detects the
provider automatically. AI generation requires WordPress 6.9 or newer (the Abilities API).

= Does Sectioneer send my content to any external service? =

Not on its own, and never the page content. Only when you explicitly generate or edit
a section with AI, your prompt and your theme's design-token slugs are sent to the AI
provider you configured, through the AI Client on your site. See "External services"
in the description.

= Is this production-ready? =

Sectioneer is early, pre-release software (0.1.0). It uses only public WordPress and
Gutenberg APIs and degrades gracefully, but you should evaluate it on a staging site
before relying on it in production.

== Screenshots ==

1. The first-run welcome guide that helps you discover Sectioneer.
2. The Sectioneer sidebar with the curated Sections panel.
3. Generating a section with AI from a natural-language prompt.

== Changelog ==

= 0.1.0 =
* Initial release.
* Curated, theme-aware section library with search and one-click insert.
* Theme-aware restyle: raw colors remapped to the nearest theme.json palette token.
* Optional AI section generation and in-place editing via the WordPress Abilities API
  and AI Client, with transient-error retry, cancellation, and a proactive
  "no provider configured" notice.
* AI/markup hardening: every inserted block is rebuilt against registered block types.
* First-run onboarding guide and wp-admin welcome notice.

== Upgrade Notice ==

= 0.1.0 =
First public release.
