Divine

A WordPress change loop that keeps your live theme safe.

Divine separates the live theme from the work an agent is doing. Every task gets a git-backed copy, so changes can be previewed, reviewed, and merged without letting the agent edit the live theme directly.

Divine worktree canvas with changed blocks and merge panel visible

One task, one isolated theme workspace.

The workflow is deliberately narrow. The agent gets enough access to finish the task, but direct changes to the live theme stay behind review.

Start from the theme

Templates, blocks, pages, assets, schemas, and styles stay in a normal WordPress theme.

Create the worktree

Divine creates a git-backed theme workspace for the task, with its own preview state.

Issue scoped MCP access

The agent receives a worktree id and command surface, then inspects files, edits blocks, and updates pages inside that one task.

Validate the worktree

Check fires in pure PHP on every write. Broken theme structure flags before it reaches review.

Iterate safely

If the result needs adjustment, the agent keeps working in the copy while the live theme remains untouched.

Merge after review

The worktree becomes a file-by-file review surface. Main changes only after approval.

The agent sees a task boundary, not an open-ended admin.

Divine turns broad WordPress work into a narrow runtime contract. Commands execute in the selected worktree and the UI keeps the boundary visible.

# Human starts a scoped task select_app divine-dev-drift → main is readable create_worktree "landing refresh" → worktree ready issue_mcp_token --scope worktree → agent can edit only the copy open_review → inspect diff before merge
# Worktree result execute "check blocks pages data" → no findings execute "git diff --stat" → pages/home/index.php | 12 +++++--- → blocks/hero/index.php | 8 ++++-- open_review → inspect before merge

What the live theme is protected from.

The boundary is enforced, not advisory. Divine refuses commands that would step outside the assigned worktree, even if the agent asks for them directly.

No edits to the live theme

The agent has no write path into the active theme. Files outside the worktree are read-only or invisible.

Worktree-scoped filesystem

The virtual filesystem rejects paths above the worktree root. Server files and other apps stay out of reach.

Blocked WP-CLI groups

Dangerous WP-CLI families like network, super-admin, db cli, and config edit are refused on the agent path.

Hookless git

Git runs without hooks, so a worktree cannot trigger arbitrary scripts on the host.

No site secrets

MCP tokens are scoped per app and per worktree. Agents cannot read site credentials or other tokens.

Validated wp eval

wp eval and wp eval-file go through nikic/php-parser before they run. Arbitrary PHP cannot slip into the runtime.

Review is part of the workflow, not an afterthought.

The same worktree that produced a visual change also exposes the files behind it. You can inspect the changed block, page, asset, schema, or QA note before promoting anything back to the live theme.

Mark changed blocks

Canvas highlights changed rendered blocks so visual review starts where the work happened.

Open exact files

The merge panel lists every changed file with additions and removals.

Keep context visible

Preview and review sit side by side instead of forcing a switch to another tool.

Discard safely

If the direction is wrong, remove the worktree and the live theme remains unchanged.

Give agents a safe lane through WordPress.

Worktree first. Preview second. Review before merge.