Skip to content

Commit 1db0e80

Browse files
committed
feat: prepare atomic agency demo
1 parent 60ccd77 commit 1db0e80

6 files changed

Lines changed: 531 additions & 1 deletion

File tree

.distignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ vendor/**/test
1717
vendor/**/tests
1818

1919
blocks/chat/src
20+
blocks/chat-panel/src
2021
blocks/routines/src
2122

2223
composer.json

.github/workflows/wpcom.yml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: Deploy to WordPress.com
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
jobs:
10+
Deploy-Plugin:
11+
name: Deploy-Plugin
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v6
17+
18+
- name: Setup Node.js
19+
uses: actions/setup-node@v6
20+
with:
21+
node-version: '22'
22+
cache: npm
23+
24+
- name: Setup PHP
25+
uses: shivammathur/setup-php@v2
26+
with:
27+
php-version: '8.2'
28+
extensions: mbstring, intl, zip
29+
tools: composer:v2
30+
coverage: none
31+
32+
- name: Install Node dependencies
33+
run: npm ci
34+
35+
- name: Install Composer dependencies
36+
run: composer install --no-dev --prefer-dist --no-progress --optimize-autoloader
37+
38+
- name: Build assets
39+
run: npm run build
40+
41+
- name: Upload WordPress.com artifact
42+
uses: actions/upload-artifact@v4
43+
with:
44+
name: wpcom
45+
path: |
46+
.
47+
!.git*
48+
!.github/**
49+
!.wordpress-org/**
50+
!bin/**
51+
!docs/**
52+
!node_modules/**
53+
!node_modules
54+
!tests/**
55+
!tools/**
56+
!vendor/bin/**
57+
!vendor/**/docs/**
58+
!vendor/**/test/**
59+
!vendor/**/tests/**
60+
!vendor/**/.git/**
61+
!blocks/chat/src/**
62+
!blocks/chat-panel/src/**
63+
!blocks/routines/src/**
64+
!composer.json
65+
!composer.lock
66+
!eslint.config.mjs
67+
!homeboy.json
68+
!package.json
69+
!package-lock.json
70+
!phpcs.xml.dist
71+
!phpstan.neon.dist
72+
!phpunit.xml.dist
73+
!playwright.config.js
74+
!playwright-report/**
75+
!test-results/**
76+
!README.md
77+
retention-days: 1

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@ openclaWP can generate client-specific automation packages from reusable agency
198198
5. Review the generated agent registration args, workflow spec, connector plan, KB plan, approval policy, and demo script.
199199

200200
The wp-admin surface lives at **openclaWP → Agency**. Full runbook: [`docs/agency-automation.md`](docs/agency-automation.md).
201+
For a WordPress.com Atomic staging/demo install, use [`docs/atomic-demo.md`](docs/atomic-demo.md).
201202

202203
---
203204

@@ -308,6 +309,7 @@ End-to-end (REST → ability → `proc_open` → real WhatsApp) is exercised man
308309
- [`tools/wp-env/README.md`](tools/wp-env/README.md) — wp-env scaffold troubleshooting + advanced flags
309310
- [`docs/whatsapp-setup.md`](docs/whatsapp-setup.md) — Meta-side runbook for the official Cloud API channel
310311
- [`docs/local-ollama.md`](docs/local-ollama.md) — agent runbook for routing chat to a local Gemma via Ollama
312+
- [`docs/atomic-demo.md`](docs/atomic-demo.md) — WordPress.com Atomic deployment and agency demo runbook
311313
- [`docs/provider-precedence.md`](docs/provider-precedence.md) — recorded design for per-agent / per-site provider routing
312314

313315
---

docs/agency-automation.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ openclaWP's agency layer turns an existing WordPress site into a launch point fo
1414
`POST /wp-json/openclawp/v1/agency/generate`
1515
5. Configure missing connector packs, index the KB, review approvals, and run the demo prompts.
1616

17+
The same flow is available in wp-admin at **openclaWP -> Agency**. Use the
18+
generator form to pick a blueprint, save a client workspace, mark available
19+
connector packs, and save the generated demo package for a sales call.
20+
1721
The generated package contains:
1822

1923
- `agent_registration`: args ready to pass to `wp_register_agent()`.
@@ -81,3 +85,8 @@ Built-in packs:
8185
- It does not auto-install external CRM/calendar/helpdesk connectors.
8286
- It does not auto-register generated agents in production. The package returns registration args and workflow specs for review first.
8387
- It does not include page-builder-specific automation.
88+
89+
## Atomic Demo
90+
91+
For a WordPress.com Atomic staging/demo site, use the deploy and sales-call
92+
runbook in [docs/atomic-demo.md](atomic-demo.md).

docs/atomic-demo.md

Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
# Atomic Demo Runbook
2+
3+
This runbook is for installing openclaWP on a WordPress.com Atomic site and using it to demo agency automation packages for existing-client websites.
4+
5+
## Goal
6+
7+
Show an agency buyer that openclaWP can inspect a client site, recommend automation opportunities, and generate a reviewable agent package with:
8+
9+
- agent registration args
10+
- workflow spec
11+
- connector plan
12+
- knowledge-base plan
13+
- approval policy
14+
- sales-call demo prompts
15+
- deployment checklist
16+
17+
The demo is intentionally not focused on editing WordPress pages or Elementor layouts.
18+
19+
## Access Needed
20+
21+
1. WordPress.com Business or Commerce plan site with Atomic/plugin support.
22+
2. Admin access to wp-admin.
23+
3. Access to the site's WordPress.com Deployments tab, or SSH/SFTP access.
24+
4. A configured AI Client provider for the site. For Atomic, use a cloud provider connector unless Ollama is reachable from the site over HTTPS.
25+
5. Optional: WP-CLI access through WordPress.com SSH for faster smoke checks.
26+
27+
## Recommended Deploy Path
28+
29+
Use WordPress.com GitHub Deployments in Advanced mode.
30+
31+
1. Connect `lezama/openclawp` to the Atomic site from WordPress.com -> site -> Deployments.
32+
2. Use branch `main`.
33+
3. Set destination directory to `/wp-content/plugins/openclawp`.
34+
4. Set deployment mode to Advanced.
35+
5. Select `.github/workflows/wpcom.yml`.
36+
6. Use Manual deployments for a real production/demo site; Automatic is fine for a disposable staging site.
37+
7. Trigger the first deployment manually.
38+
39+
The workflow installs production Composer dependencies, installs Node dependencies, builds block/admin assets, and uploads a `wpcom` artifact containing only the plugin runtime files.
40+
41+
## Alternate Deploy Path
42+
43+
If GitHub Deployments is not connected yet, build the ZIP locally and upload it in wp-admin:
44+
45+
```bash
46+
composer install --no-dev --prefer-dist --no-progress --optimize-autoloader
47+
npm ci
48+
npm run build
49+
bash bin/build.sh 0.1.0
50+
```
51+
52+
Upload `openclawp.zip` from Plugins -> Add New Plugin -> Upload Plugin.
53+
54+
## Activation
55+
56+
After deployment:
57+
58+
1. Activate `openclaWP`.
59+
2. Confirm the site has WordPress 7.0+ AI Client functions available.
60+
3. Configure one provider connector.
61+
4. Run the setup wizard and enable the bundled example agent for smoke testing.
62+
5. Open openclaWP -> Chat and ask:
63+
- `what is my latest post?`
64+
- `who am I?`
65+
- `how many pending comments?`
66+
67+
WP-CLI smoke checks:
68+
69+
```bash
70+
wp plugin activate openclawp
71+
wp option update openclawp_setup_enable_example_agent 1
72+
wp option update openclawp_setup_completed 1
73+
wp eval 'var_dump(function_exists("wp_ai_client_prompt"), defined("AGENTS_API_LOADED"));'
74+
```
75+
76+
## Demo Data
77+
78+
The agency audit is stronger when the site has pages that look like a real service business. On a disposable demo site, seed a few pages:
79+
80+
```bash
81+
wp post create --post_type=page --post_status=publish --post_title='Services' --post_content='We offer consultations, implementation, support, and managed services.'
82+
wp post create --post_type=page --post_status=publish --post_title='Request a Quote' --post_content='Request a quote for a project. Tell us your timeline, budget, and goals.'
83+
wp post create --post_type=page --post_status=publish --post_title='Book a Consultation' --post_content='Book an appointment with our team. We offer weekday consultations.'
84+
wp post create --post_type=page --post_status=publish --post_title='Support FAQ' --post_content='Find answers about pricing, onboarding, support, refunds, and account help.'
85+
```
86+
87+
## Live Demo Script
88+
89+
1. Open openclaWP -> Agency.
90+
2. Show Top opportunities on this site and explain that the audit maps site signals to automation offers.
91+
3. In Generate a client demo package, choose the top use case.
92+
4. Fill client name, industry, goals, available connectors, and blueprint answers.
93+
5. Click Generate demo package.
94+
6. Show Recent generated demos:
95+
- missing answers
96+
- connectors to configure
97+
- demo prompts
98+
7. Open openclaWP -> Chat and use one generated demo prompt as the customer scenario.
99+
8. Close with the production checklist: configure connectors, index KB sources, review approval policy, then register the generated agent/workflow.
100+
101+
## Good Demo Defaults
102+
103+
For a lead-generation agency demo:
104+
105+
```text
106+
Blueprint: Lead concierge
107+
Industry: local services
108+
Goals: qualify leads, reduce response time, route sales requests
109+
Available connectors: Forms, Email
110+
Answers:
111+
offer: Initial consultation
112+
qualification_fields: service needed, timeline, budget, location
113+
handoff_destination: sales inbox
114+
tone: concise and consultative
115+
```
116+
117+
For a booking demo:
118+
119+
```text
120+
Blueprint: Booking agent
121+
Industry: clinic
122+
Goals: collect appointment requirements, reduce phone calls, prepare booking handoff
123+
Available connectors: Email
124+
Answers:
125+
bookable_services: consultations and follow-up appointments
126+
availability_rules: weekdays, 9am to 5pm, no same-day bookings
127+
calendar_destination: clinic calendar
128+
```
129+
130+
## Risks To Check Before The Call
131+
132+
- The Atomic site must support the required WordPress/AI Client runtime.
133+
- The provider connector must be configured before Chat can call a model.
134+
- The Agency generator creates a reviewable package; it does not auto-install external CRM, calendar, helpdesk, or WhatsApp connectors.
135+
- The plugin is still spike-stage software. Use a demo/staging Atomic site, not a client production site.

0 commit comments

Comments
 (0)