=== Vibecoder Theme Sync ===
Contributors: doxi
Tags: github, themes, backups, developer-tools, ai
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
Stable tag: 1.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Sync GitHub themes built for Vibecoder, with validation, backups, one-click updates, and managed page setup.

== Description ==

WP Vibecoder connects a WordPress site to a GitHub repository that contains a WordPress theme project. It downloads a selected branch, validates the WP Vibecoder project structure, backs up the existing managed theme files, installs the synchronized theme, and can create or update declared WordPress pages without overwriting editor content.

WP Vibecoder does not generate code inside WordPress and does not provide a page builder. Code changes happen in the connected GitHub repository, then an administrator confirms synchronization from the WordPress dashboard.

Key features:

* Connect a public or private GitHub repository.
* Validate `wp-vibecoder.json`, theme headers, safe ZIP contents, and required theme files.
* Install or update the managed theme through a staging directory.
* Save a theme-file backup before replacing an existing managed theme.
* Restore the latest available theme-file backup.
* Create or reuse the WP Vibecoder Home page and assign it as the static homepage.
* Create declared pages while preserving manually edited page content.
* Create declared Fluent Forms forms for contact, newsletter, and lead capture workflows.
* Create a new GitHub repository from the WP Vibecoder starter through the WP Vibecoder API, or open the starter template on GitHub.

Backups created by this plugin include theme files only. They do not include pages, posts, settings, plugins, uploads, users, or database content.

== External Services ==

WP Vibecoder communicates with external services only when an administrator configures or uses the related feature.

= GitHub API =

Service: GitHub

Used for:

* Reading repository metadata and branch commit SHAs.
* Downloading repository ZIP archives for validation and synchronization.
* Accessing private repositories when the administrator provides a GitHub token or connects the WP Vibecoder GitHub App.

Data sent to GitHub:

* Repository owner/name and selected branch.
* Optional administrator-provided GitHub personal access token, sent as an authorization header.
* Requests initiated from the administrator's WordPress site.

GitHub terms: https://docs.github.com/en/site-policy/github-terms/github-terms-of-service
GitHub privacy statement: https://docs.github.com/en/site-policy/privacy-policies/github-general-privacy-statement

= WP Vibecoder API =

Service: WP Vibecoder API

Used for:

* Starting and claiming a GitHub App connection.
* Listing authorized GitHub installations and repositories.
* Creating a GitHub repository from the WP Vibecoder starter.
* Downloading repository archives and checking branch commit SHAs after a GitHub App connection is configured.
* Reading agent.md compatibility metadata and creating an agent.md update pull request when an administrator clicks Update Agent.md.

Data sent to WP Vibecoder API:

* Site URL and site name when starting a GitHub connection.
* Connection session identifiers and poll secrets generated for the connection flow.
* GitHub repository owner/name, branch, installation ID, repository name, description, and privacy setting when creating or browsing repositories.
* agent.md content when checking or creating an agent instruction update pull request.
* A site token issued by WP Vibecoder after the administrator completes the GitHub connection.

WP Vibecoder API endpoint: https://api.wpvibecoder.com/api/v1/
WP Vibecoder terms: https://wpvibecoder.com/terms
WP Vibecoder privacy policy: https://wpvibecoder.com/privacy

= Optional external links =

The setup screen can open GitHub, ChatGPT Codex, Gemini, Claude Code, and Cursor links when an administrator clicks those actions. WP Vibecoder does not send site data to those services automatically through those links.

== Installation ==

1. Upload the `vibecoder-theme-sync` folder to `/wp-content/plugins/`.
2. Activate WP Vibecoder from the WordPress Plugins screen.
3. Open WP Vibecoder in the WordPress admin menu.
4. Connect GitHub or enter a repository URL and branch manually.
5. Use Connect & import to validate and import the theme.
6. Activate the imported theme when ready.

== Frequently Asked Questions ==

= Does WP Vibecoder create a full site backup? =

No. WP Vibecoder creates ZIP backups of managed theme files before replacing them. Pages, posts, settings, plugins, uploads, users, and database content are not included.

= Can I restore any backup? =

In this version, the Backups screen restores the latest available theme-file backup only.

= Does WP Vibecoder generate AI content inside WordPress? =

No. WP Vibecoder synchronizes code from GitHub. AI-assisted changes happen in external coding tools or editors connected to the repository.

= Does the plugin include the starter theme ZIP? =

No. The plugin can create a GitHub repository from the WP Vibecoder starter through the WP Vibecoder API, or open the starter template on GitHub.

= Does WP Vibecoder support ACF? =

ACF integration is not included in this version. ACF support is reserved for a future Pro workflow.

= Can WP Vibecoder create forms during sync? =

Yes. Repositories can declare managed forms in wp-vibecoder.json using provider fluent-forms and a requires.plugins dependency with slug fluentform. Fluent Forms must be installed and active before sync. If Fluent Forms is missing or below the declared minimum version, WP Vibecoder stops before installing or syncing theme files. WP Vibecoder creates or updates the declared forms and themes render them with wpv_render_form( 'form-id' ).

= What does Update Agent.md do? =

It creates a GitHub pull request that inserts or updates WP Vibecoder-managed instruction blocks in agent.md. It does not merge the PR automatically and it preserves custom instructions outside WP Vibecoder marker blocks. The GitHub App installation must grant Contents read/write and Pull requests read/write permissions.

== Changelog ==

= 1.0 =

* Initial release.
