@lebtiga/sonic-agent 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/LICENSE.txt +223 -0
  2. package/README.md +61 -0
  3. package/bin/sonic.js +304 -0
  4. package/lib/index.js +20 -0
  5. package/lib/installer.js +156 -0
  6. package/lib/license.js +48 -0
  7. package/package.json +46 -0
  8. package/plugin/.claude-plugin/plugin.json +13 -0
  9. package/plugin/README.md +100 -0
  10. package/plugin/agents/sonic.md +80 -0
  11. package/plugin/commands/sonic-build.md +145 -0
  12. package/plugin/commands/sonic-help.md +71 -0
  13. package/plugin/skills/accessibility-qa/SKILL.md +160 -0
  14. package/plugin/skills/accessibility-qa/templates/accessibility-qa-report-template.md +123 -0
  15. package/plugin/skills/accessibility-qa/templates/wcag-compliance-statement.md +70 -0
  16. package/plugin/skills/aka-wireframe-wp/SKILL.md +149 -0
  17. package/plugin/skills/aka-wireframe-wp/assets/aka-framework-theme/README.md +190 -0
  18. package/plugin/skills/aka-wireframe-wp/assets/aka-framework-theme/footer.php +49 -0
  19. package/plugin/skills/aka-wireframe-wp/assets/aka-framework-theme/functions.php +395 -0
  20. package/plugin/skills/aka-wireframe-wp/assets/aka-framework-theme/header.php +58 -0
  21. package/plugin/skills/aka-wireframe-wp/assets/aka-framework-theme/index.php +39 -0
  22. package/plugin/skills/aka-wireframe-wp/assets/aka-framework-theme/page-answer.php +62 -0
  23. package/plugin/skills/aka-wireframe-wp/assets/aka-framework-theme/page-authority-hub.php +122 -0
  24. package/plugin/skills/aka-wireframe-wp/assets/aka-framework-theme/page-knowledge.php +58 -0
  25. package/plugin/skills/aka-wireframe-wp/assets/aka-framework-theme/style.css +633 -0
  26. package/plugin/skills/aka-wireframe-wp/references/content-generator.md +371 -0
  27. package/plugin/skills/aka-wireframe-wp/references/internal-linker.md +430 -0
  28. package/plugin/skills/aka-wireframe-wp/references/orchestrator.md +269 -0
  29. package/plugin/skills/aka-wireframe-wp/references/prompts-library.md +880 -0
  30. package/plugin/skills/aka-wireframe-wp/references/seo-optimizer.md +433 -0
  31. package/plugin/skills/aka-wireframe-wp/references/strategy-planner.md +317 -0
  32. package/plugin/skills/aka-wireframe-wp/references/wordpress-deployer.md +545 -0
  33. package/plugin/skills/authority-site-builder/SKILL.md +138 -0
  34. package/plugin/skills/brand-philosophy/SKILL.md +77 -0
  35. package/plugin/skills/freepik-spaces/SKILL.md +122 -0
  36. package/plugin/skills/freepik-spaces/docs/automation-guide.md +233 -0
  37. package/plugin/skills/freepik-spaces/docs/research-notes.md +264 -0
  38. package/plugin/skills/freepik-spaces/plans/naseberry-demo-plan.md +320 -0
  39. package/plugin/skills/freepik-spaces/templates/naseberry-demo.json +302 -0
  40. package/plugin/skills/freepik-spaces/templates/saas-demo.json +212 -0
  41. package/plugin/skills/frontend-design/LICENSE.txt +177 -0
  42. package/plugin/skills/frontend-design/SKILL.md +77 -0
  43. package/plugin/skills/programmatic-seo/SKILL.md +236 -0
  44. package/plugin/skills/programmatic-seo/references/playbooks.md +293 -0
  45. package/plugin/skills/seo-qa/SKILL.md +132 -0
  46. package/plugin/skills/seo-qa/templates/schema-localbusiness.json +49 -0
  47. package/plugin/skills/seo-qa/templates/schema-service.json +36 -0
  48. package/plugin/skills/seo-qa/templates/seo-qa-report-template.md +90 -0
  49. package/plugin/skills/visual-identity/SKILL.md +109 -0
  50. package/plugin/skills/visual-identity/templates/style-guide-template.md +108 -0
  51. package/plugin/skills/website-image-gen/SKILL.md +82 -0
  52. package/plugin/skills/website-image-gen/templates/blog-featured.md +56 -0
  53. package/plugin/skills/website-image-gen/templates/hero-service-photo.md +56 -0
  54. package/plugin/skills/wordpress-pro/SKILL.md +105 -0
  55. package/plugin/skills/wordpress-pro/references/gutenberg-blocks.md +870 -0
  56. package/plugin/skills/wordpress-pro/references/hooks-filters.md +845 -0
  57. package/plugin/skills/wordpress-pro/references/performance-security.md +1012 -0
  58. package/plugin/skills/wordpress-pro/references/plugin-architecture.md +1041 -0
  59. package/plugin/skills/wordpress-pro/references/theme-development.md +858 -0
  60. package/plugin/sops/SOP-Sonic 777/authority-site-sop.html +1100 -0
  61. package/plugin/sops/SOP-WORDPRESS-330-PAGE-SITES.md +926 -0
  62. package/scripts/postinstall.js +109 -0
@@ -0,0 +1,926 @@
1
+ # SOP: Building 330+ Page WordPress Sites with AI
2
+
3
+ **Version:** 1.0
4
+ **Created:** February 3, 2026
5
+ **Author:** Rabih's Team
6
+ **Delivery Time:** 1-2 weeks
7
+ **Price Point:** $750
8
+
9
+ ---
10
+
11
+ ## Overview
12
+
13
+ This SOP guides you through building a 330+ page WordPress website for any local service business using AI-powered content generation. The system creates:
14
+
15
+ | Page Type | Typical Count | Purpose |
16
+ |-----------|---------------|---------|
17
+ | Programmatic SEO Pages | ~130 | Location pages, service+city pages, FAQs, comparisons |
18
+ | AKA Authority Pages | ~200 | Treatment/service guides with knowledge + Q&A content |
19
+ | **Total** | **~330** | Comprehensive topical authority |
20
+
21
+ ---
22
+
23
+ ## What You Need From the Client
24
+
25
+ ### Required (Minimum)
26
+ 1. **Google My Business (GMB) Link** - This gives you:
27
+ - Business name
28
+ - Address/location
29
+ - Service area
30
+ - Business category
31
+ - Phone number
32
+ - Hours
33
+
34
+ ### Nice to Have
35
+ - Logo (or we generate one)
36
+ - Brand colors (or we choose elegant defaults)
37
+ - List of services with prices
38
+ - Competitor names
39
+ - Any specific content/messaging preferences
40
+
41
+ ---
42
+
43
+ ## Phase 1: Server Setup (First Time Only)
44
+
45
+ ### Option A: Virtual Private Server (VPS) - RECOMMENDED
46
+ Recommended: DigitalOcean, Linode, or Vultr ($6-12/month)
47
+
48
+ ```bash
49
+ # Connect to your VPS
50
+ ssh root@your-server-ip
51
+
52
+ # Update system
53
+ apt update && apt upgrade -y
54
+
55
+ # Install Docker
56
+ apt install docker.io docker-compose -y
57
+
58
+ # Install Node.js
59
+ curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
60
+ apt install nodejs -y
61
+
62
+ # Install OpenClaw
63
+ npm install -g openclaw
64
+
65
+ # Configure OpenClaw (follow prompts - you'll need Anthropic API key)
66
+ openclaw configure
67
+
68
+ # Install tmux for persistent sessions
69
+ apt install tmux -y
70
+ ```
71
+
72
+ ### Option B: Local Machine (Mac/Linux)
73
+ Same commands, but use `sudo` where needed.
74
+
75
+ ---
76
+
77
+ ## Phase 1.5: Working with OpenClaw TUI (Your AI Editor)
78
+
79
+ The OpenClaw TUI (Terminal UI) is your AI-powered editor. It's how you'll build everything.
80
+
81
+ ### Connecting to Work
82
+ ```bash
83
+ # SSH into your server
84
+ ssh user@your-server-ip
85
+
86
+ # Start a tmux session (keeps running if you disconnect)
87
+ tmux new -s wordpress-builds
88
+
89
+ # Navigate to project folder
90
+ cd ~/projects/clientname
91
+
92
+ # Launch OpenClaw TUI
93
+ openclaw tui
94
+ ```
95
+
96
+ ### Using the TUI
97
+ Once inside OpenClaw TUI:
98
+ - **Type naturally** - "Create a WordPress theme for a dental practice with blue and white colors"
99
+ - **It can read/edit files** - "Read the functions.php and add a custom post type for locations"
100
+ - **It can run commands** - "Start the Docker containers"
101
+ - **It remembers context** - Keep chatting, it knows what you're working on
102
+
103
+ ### Example Workflow in TUI
104
+ ```
105
+ You: "I'm building a site for Johnson Dental in Chicago.
106
+ They do cleanings ($150), whitening ($400), implants ($3000),
107
+ crowns ($1200), and emergency visits ($250).
108
+ Service area is 20 miles around Chicago."
109
+
110
+ AI: [Creates brand config, sets up theme, generates pages...]
111
+
112
+ You: "Generate the 130 SEO pages"
113
+
114
+ AI: [Runs the generator, creates all location + service pages...]
115
+
116
+ You: "Now create the AKA authority pages for each service"
117
+
118
+ AI: [Generates 200 educational pages...]
119
+ ```
120
+
121
+ ### Reconnecting to Work
122
+ ```bash
123
+ # If you disconnected, reconnect to your session
124
+ ssh user@your-server-ip
125
+ tmux attach -t wordpress-builds
126
+
127
+ # You're back where you left off!
128
+ ```
129
+
130
+ ### Multiple Projects
131
+ ```bash
132
+ # Create separate tmux sessions per client
133
+ tmux new -s client-johnson-dental
134
+ tmux new -s client-smith-hvac
135
+
136
+ # Switch between them
137
+ tmux switch -t client-johnson-dental
138
+
139
+ # List all sessions
140
+ tmux ls
141
+ ```
142
+
143
+ ### Keyboard Shortcuts (tmux)
144
+ | Keys | Action |
145
+ |------|--------|
146
+ | `Ctrl+B, D` | Detach (leave session running) |
147
+ | `Ctrl+B, C` | New window |
148
+ | `Ctrl+B, N` | Next window |
149
+ | `Ctrl+B, P` | Previous window |
150
+ | `Ctrl+B, [` | Scroll mode (q to exit) |
151
+
152
+ ---
153
+
154
+ ## Phase 2: Project Setup
155
+
156
+ ### Step 2.1: Create Project Directory
157
+ ```bash
158
+ # Replace CLIENT_NAME with actual client name (lowercase, no spaces)
159
+ CLIENT_NAME="clientname"
160
+ PROJECT_DIR="$HOME/projects/$CLIENT_NAME"
161
+
162
+ mkdir -p $PROJECT_DIR
163
+ cd $PROJECT_DIR
164
+ ```
165
+
166
+ ### Step 2.2: Create Docker Configuration
167
+
168
+ Create `docker-compose.yml`:
169
+ ```yaml
170
+ version: '3.8'
171
+
172
+ services:
173
+ wordpress:
174
+ image: wordpress:latest
175
+ container_name: ${CLIENT_NAME}-wordpress
176
+ ports:
177
+ - "8080:80"
178
+ environment:
179
+ WORDPRESS_DB_HOST: db
180
+ WORDPRESS_DB_USER: wordpress
181
+ WORDPRESS_DB_PASSWORD: wordpress
182
+ WORDPRESS_DB_NAME: wordpress
183
+ volumes:
184
+ - ./wp-content:/var/www/html/wp-content
185
+ - ./.htaccess:/var/www/html/.htaccess
186
+ depends_on:
187
+ - db
188
+
189
+ db:
190
+ image: mariadb:latest
191
+ container_name: ${CLIENT_NAME}-db
192
+ environment:
193
+ MYSQL_ROOT_PASSWORD: rootpassword
194
+ MYSQL_DATABASE: wordpress
195
+ MYSQL_USER: wordpress
196
+ MYSQL_PASSWORD: wordpress
197
+ volumes:
198
+ - db_data:/var/lib/mysql
199
+
200
+ phpmyadmin:
201
+ image: phpmyadmin:latest
202
+ container_name: ${CLIENT_NAME}-phpmyadmin
203
+ ports:
204
+ - "8081:80"
205
+ environment:
206
+ PMA_HOST: db
207
+ MYSQL_ROOT_PASSWORD: rootpassword
208
+
209
+ volumes:
210
+ db_data:
211
+ ```
212
+
213
+ Create `.htaccess`:
214
+ ```apache
215
+ # BEGIN WordPress
216
+ <IfModule mod_rewrite.c>
217
+ RewriteEngine On
218
+ RewriteBase /
219
+ RewriteRule ^index\.php$ - [L]
220
+ RewriteCond %{REQUEST_FILENAME} !-f
221
+ RewriteCond %{REQUEST_FILENAME} !-d
222
+ RewriteRule . /index.php [L]
223
+ </IfModule>
224
+ # END WordPress
225
+ ```
226
+
227
+ ### Step 2.3: Start WordPress
228
+ ```bash
229
+ docker compose up -d
230
+
231
+ # Wait 30 seconds for startup
232
+ sleep 30
233
+
234
+ # Verify running
235
+ docker ps
236
+ ```
237
+
238
+ Access points:
239
+ - WordPress: http://localhost:8080 (or http://YOUR_SERVER_IP:8080)
240
+ - phpMyAdmin: http://localhost:8081
241
+
242
+ ### Step 2.4: Complete WordPress Install
243
+ 1. Go to WordPress URL
244
+ 2. Select language
245
+ 3. Fill in:
246
+ - Site Title: [Client Business Name]
247
+ - Username: admin
248
+ - Password: (generate strong password, save it)
249
+ - Email: (your email)
250
+ 4. Click "Install WordPress"
251
+ 5. Log in
252
+
253
+ ### Step 2.5: Configure Permalinks
254
+ 1. Go to Settings → Permalinks
255
+ 2. Select "Post name" (`/%postname%/`)
256
+ 3. Save Changes
257
+
258
+ ---
259
+
260
+ ## Phase 3: Gather Business Information
261
+
262
+ ### Step 3.1: Extract from GMB
263
+ Visit the client's GMB profile and note:
264
+
265
+ ```
266
+ Business Name: ________________________
267
+ Address: ________________________
268
+ City: ________________________
269
+ State: ________________________
270
+ Zip: ________________________
271
+ Phone: ________________________
272
+ Category: ________________________
273
+ Service Area Cities: ________________________
274
+ ```
275
+
276
+ ### Step 3.2: Research Services
277
+ From GMB, website (if exists), or client:
278
+
279
+ | # | Service Name | Price | Duration |
280
+ |---|--------------|-------|----------|
281
+ | 1 | | $ | |
282
+ | 2 | | $ | |
283
+ | 3 | | $ | |
284
+ | 4 | | $ | |
285
+ | 5 | | $ | |
286
+
287
+ **Tip:** 5 core services is ideal. More is fine but keep it focused.
288
+
289
+ ### Step 3.3: Identify Target Cities
290
+ List all cities within the service area (typically 15-25 mile radius):
291
+
292
+ ```
293
+ 1. [Main City - HQ]
294
+ 2.
295
+ 3.
296
+ 4.
297
+ 5.
298
+ ... (aim for 15-20 cities)
299
+ ```
300
+
301
+ **Tip:** Use Google Maps to find nearby cities. Include suburbs and neighboring towns.
302
+
303
+ ### Step 3.4: Create Brand Configuration
304
+
305
+ Create `BRAND.md` in project folder:
306
+ ```markdown
307
+ # Brand Configuration
308
+
309
+ ## Business Info
310
+ - **Name:** [Business Name]
311
+ - **Tagline:** [Create compelling tagline]
312
+ - **Location:** [City, State]
313
+ - **Phone:** [Phone]
314
+ - **Email:** [Email]
315
+
316
+ ## Services
317
+ 1. [Service 1] - $[Price]
318
+ 2. [Service 2] - $[Price]
319
+ 3. [Service 3] - $[Price]
320
+ 4. [Service 4] - $[Price]
321
+ 5. [Service 5] - $[Price]
322
+
323
+ ## Target Cities (within [X] mile radius)
324
+ [City 1], [City 2], [City 3], ...
325
+
326
+ ## Brand Colors
327
+ - Primary: #[hex] (accent color)
328
+ - Secondary: #[hex] (background)
329
+ - Dark: #1a1a1a (text)
330
+ - White: #ffffff
331
+
332
+ ## Fonts
333
+ - Headings: [Font Name]
334
+ - Body: [Font Name]
335
+
336
+ ## Competitors
337
+ 1. [Competitor 1]
338
+ 2. [Competitor 2]
339
+ 3. [Competitor 3]
340
+
341
+ ## Unique Value Proposition
342
+ [What makes this business different?]
343
+ ```
344
+
345
+ ---
346
+
347
+ ## Phase 4: Theme Development
348
+
349
+ ### Step 4.1: Create Theme Structure
350
+ ```bash
351
+ cd $PROJECT_DIR/wp-content/themes
352
+ mkdir -p clientname-theme/{assets/{css,js,images},inc,template-parts,seo-data}
353
+ cd clientname-theme
354
+ ```
355
+
356
+ ### Step 4.2: Create style.css
357
+ ```css
358
+ /*
359
+ Theme Name: [Client Name] Theme
360
+ Theme URI: https://[domain].com
361
+ Author: Your Agency
362
+ Description: Custom theme with programmatic SEO
363
+ Version: 1.0.0
364
+ Text Domain: clientname
365
+ */
366
+
367
+ :root {
368
+ --primary: #[primary-color];
369
+ --secondary: #[secondary-color];
370
+ --dark: #1a1a1a;
371
+ --light: #f8f8f8;
372
+ --white: #ffffff;
373
+ }
374
+
375
+ /* Base styles here */
376
+ ```
377
+
378
+ ### Step 4.3: Use AI to Build Theme
379
+
380
+ With OpenClaw or your AI assistant, provide:
381
+ 1. The BRAND.md content
382
+ 2. Request: "Build a complete WordPress theme with this brand"
383
+
384
+ The AI should create:
385
+ - functions.php (post types, menus, scripts)
386
+ - header.php (navigation, logo)
387
+ - footer.php (links, contact info)
388
+ - front-page.php (homepage sections)
389
+ - page.php (standard pages)
390
+ - Template parts for homepage sections
391
+ - Custom CSS with brand colors
392
+ - JavaScript for animations (optional GSAP)
393
+
394
+ ### Step 4.4: Create SEO Data Files
395
+
396
+ **seo-data/locations.json:**
397
+ ```json
398
+ {
399
+ "locations": [
400
+ {
401
+ "city": "Main City",
402
+ "slug": "main-city",
403
+ "state": "State",
404
+ "zip": "12345",
405
+ "distance": "0 miles",
406
+ "description": "Our headquarters in Main City..."
407
+ },
408
+ {
409
+ "city": "Nearby Town",
410
+ "slug": "nearby-town",
411
+ "state": "State",
412
+ "zip": "12346",
413
+ "distance": "5 miles",
414
+ "description": "Serving Nearby Town residents..."
415
+ }
416
+ ]
417
+ }
418
+ ```
419
+
420
+ **seo-data/services.json:**
421
+ ```json
422
+ {
423
+ "services": [
424
+ {
425
+ "name": "Service Name",
426
+ "slug": "service-name",
427
+ "price": 100,
428
+ "duration": "60 minutes",
429
+ "short_description": "Brief description...",
430
+ "full_description": "Detailed description...",
431
+ "benefits": [
432
+ "Benefit 1",
433
+ "Benefit 2",
434
+ "Benefit 3"
435
+ ]
436
+ }
437
+ ]
438
+ }
439
+ ```
440
+
441
+ **seo-data/faqs.json:**
442
+ ```json
443
+ {
444
+ "faqs": [
445
+ {
446
+ "question": "What is [service]?",
447
+ "slug": "what-is-service",
448
+ "answer": "Detailed answer...",
449
+ "category": "general"
450
+ }
451
+ ]
452
+ }
453
+ ```
454
+
455
+ **seo-data/competitors.json:**
456
+ ```json
457
+ {
458
+ "competitors": [
459
+ {
460
+ "name": "Competitor Name",
461
+ "slug": "competitor-name",
462
+ "description": "Brief description of competitor"
463
+ }
464
+ ]
465
+ }
466
+ ```
467
+
468
+ ---
469
+
470
+ ## Phase 5: Programmatic SEO Pages (130 pages)
471
+
472
+ ### Step 5.1: Register Custom Post Types
473
+
474
+ Add to `functions.php` or `inc/programmatic-seo.php`:
475
+
476
+ ```php
477
+ <?php
478
+ // Location Pages
479
+ register_post_type('location_page', [
480
+ 'labels' => ['name' => 'Location Pages'],
481
+ 'public' => true,
482
+ 'has_archive' => true,
483
+ 'rewrite' => ['slug' => 'locations'],
484
+ 'supports' => ['title', 'editor', 'thumbnail'],
485
+ 'show_in_menu' => true,
486
+ ]);
487
+
488
+ // Service + Location Pages
489
+ register_post_type('service_location', [
490
+ 'labels' => ['name' => 'Service Locations'],
491
+ 'public' => true,
492
+ 'has_archive' => false,
493
+ 'rewrite' => ['slug' => '/', 'with_front' => false],
494
+ 'supports' => ['title', 'editor', 'thumbnail'],
495
+ ]);
496
+
497
+ // FAQ Pages
498
+ register_post_type('faq_page', [
499
+ 'labels' => ['name' => 'FAQ Pages'],
500
+ 'public' => true,
501
+ 'has_archive' => true,
502
+ 'rewrite' => ['slug' => 'learn'],
503
+ 'supports' => ['title', 'editor'],
504
+ ]);
505
+
506
+ // Comparison Pages
507
+ register_post_type('comparison_page', [
508
+ 'labels' => ['name' => 'Comparisons'],
509
+ 'public' => true,
510
+ 'has_archive' => true,
511
+ 'rewrite' => ['slug' => 'compare'],
512
+ 'supports' => ['title', 'editor'],
513
+ ]);
514
+ ```
515
+
516
+ ### Step 5.2: Create Page Generator
517
+
518
+ Create `generate-seo.php` in theme root:
519
+
520
+ ```php
521
+ <?php
522
+ /**
523
+ * SEO Page Generator
524
+ * Access: /wp-content/themes/[theme]/generate-seo.php
525
+ */
526
+ require_once($_SERVER['DOCUMENT_ROOT'] . '/wp-load.php');
527
+
528
+ // Load data
529
+ $locations = json_decode(file_get_contents(__DIR__ . '/seo-data/locations.json'), true)['locations'];
530
+ $services = json_decode(file_get_contents(__DIR__ . '/seo-data/services.json'), true)['services'];
531
+ $faqs = json_decode(file_get_contents(__DIR__ . '/seo-data/faqs.json'), true)['faqs'];
532
+ $competitors = json_decode(file_get_contents(__DIR__ . '/seo-data/competitors.json'), true)['competitors'];
533
+
534
+ $created = 0;
535
+
536
+ // Generate Location Pages
537
+ foreach ($locations as $loc) {
538
+ if (!get_page_by_path($loc['slug'], OBJECT, 'location_page')) {
539
+ wp_insert_post([
540
+ 'post_title' => BUSINESS_NAME . ' in ' . $loc['city'],
541
+ 'post_name' => $loc['slug'],
542
+ 'post_content' => generate_location_content($loc),
543
+ 'post_status' => 'publish',
544
+ 'post_type' => 'location_page',
545
+ ]);
546
+ $created++;
547
+ }
548
+ }
549
+
550
+ // Generate Service + Location Pages
551
+ foreach ($services as $svc) {
552
+ foreach ($locations as $loc) {
553
+ $slug = $svc['slug'] . '-' . $loc['slug'];
554
+ if (!get_page_by_path($slug, OBJECT, 'service_location')) {
555
+ wp_insert_post([
556
+ 'post_title' => $svc['name'] . ' in ' . $loc['city'],
557
+ 'post_name' => $slug,
558
+ 'post_content' => generate_service_location_content($svc, $loc),
559
+ 'post_status' => 'publish',
560
+ 'post_type' => 'service_location',
561
+ ]);
562
+ $created++;
563
+ }
564
+ }
565
+ }
566
+
567
+ // Generate FAQ Pages
568
+ foreach ($faqs as $faq) {
569
+ if (!get_page_by_path($faq['slug'], OBJECT, 'faq_page')) {
570
+ wp_insert_post([
571
+ 'post_title' => $faq['question'],
572
+ 'post_name' => $faq['slug'],
573
+ 'post_content' => generate_faq_content($faq),
574
+ 'post_status' => 'publish',
575
+ 'post_type' => 'faq_page',
576
+ ]);
577
+ $created++;
578
+ }
579
+ }
580
+
581
+ // Generate Comparison Pages
582
+ foreach ($competitors as $comp) {
583
+ $slug = 'vs-' . $comp['slug'];
584
+ if (!get_page_by_path($slug, OBJECT, 'comparison_page')) {
585
+ wp_insert_post([
586
+ 'post_title' => BUSINESS_NAME . ' vs ' . $comp['name'],
587
+ 'post_name' => $slug,
588
+ 'post_content' => generate_comparison_content($comp),
589
+ 'post_status' => 'publish',
590
+ 'post_type' => 'comparison_page',
591
+ ]);
592
+ $created++;
593
+ }
594
+ }
595
+
596
+ echo "Created $created SEO pages!";
597
+ flush_rewrite_rules();
598
+ ```
599
+
600
+ ### Step 5.3: Run Generator
601
+ ```bash
602
+ # Access in browser:
603
+ http://localhost:8080/wp-content/themes/[theme]/generate-seo.php
604
+ ```
605
+
606
+ ### Step 5.4: Create Hub Pages
607
+
608
+ In WordPress Admin, create these pages:
609
+ 1. **Areas We Serve** (slug: `areas-we-serve`) - links to all location pages
610
+ 2. **All Services** (slug: `all-services`) - links to all service pages
611
+ 3. **Learn** (slug: `learn`) - links to all FAQ pages
612
+ 4. **Compare** (slug: `compare`) - links to all comparison pages
613
+
614
+ ---
615
+
616
+ ## Phase 6: AKA Framework Pages (200 pages)
617
+
618
+ ### What is AKA?
619
+ - **A**uthority Pages (5): Main pillar content / treatment guides
620
+ - **K**nowledge Pages (75): Educational supporting content
621
+ - **A**nswer Pages (120+): Specific Q&A targeting long-tail keywords
622
+
623
+ ### Step 6.1: Plan Authority Hubs
624
+
625
+ For each main service, create an Authority Hub:
626
+
627
+ | Service | Authority Hub URL | Knowledge Topics | Answer Questions |
628
+ |---------|-------------------|------------------|------------------|
629
+ | Service 1 | /service-1-guide/ | 15 topics | ~25 questions |
630
+ | Service 2 | /service-2-guide/ | 15 topics | ~25 questions |
631
+ | Service 3 | /service-3-guide/ | 15 topics | ~25 questions |
632
+ | Service 4 | /service-4-guide/ | 15 topics | ~25 questions |
633
+ | Service 5 | /service-5-guide/ | 15 topics | ~25 questions |
634
+
635
+ ### Step 6.2: Create AKA Strategy
636
+
637
+ Use AI to generate content strategy. Provide:
638
+ - Business info from BRAND.md
639
+ - Request 15 knowledge topics per service
640
+ - Request 20-25 answer questions per knowledge topic area
641
+
642
+ ### Step 6.3: Generate AKA Pages
643
+
644
+ Create `generate-aka.php`:
645
+
646
+ ```php
647
+ <?php
648
+ /**
649
+ * AKA Framework Page Generator
650
+ */
651
+ require_once($_SERVER['DOCUMENT_ROOT'] . '/wp-load.php');
652
+
653
+ $aka_strategy = json_decode(file_get_contents(__DIR__ . '/aka-config/aka-strategy.json'), true);
654
+
655
+ foreach ($aka_strategy['authority_hubs'] as $hub) {
656
+ // Create Authority (parent) page
657
+ $authority_id = wp_insert_post([
658
+ 'post_title' => $hub['title'],
659
+ 'post_name' => $hub['slug'],
660
+ 'post_content' => $hub['content'],
661
+ 'post_status' => 'publish',
662
+ 'post_type' => 'page',
663
+ ]);
664
+
665
+ // Create Knowledge (child) pages
666
+ foreach ($hub['knowledge_pages'] as $knowledge) {
667
+ $knowledge_id = wp_insert_post([
668
+ 'post_title' => $knowledge['title'],
669
+ 'post_name' => $knowledge['slug'],
670
+ 'post_content' => $knowledge['content'],
671
+ 'post_status' => 'publish',
672
+ 'post_type' => 'page',
673
+ 'post_parent' => $authority_id,
674
+ ]);
675
+
676
+ // Create Answer (grandchild) pages
677
+ foreach ($knowledge['answer_pages'] as $answer) {
678
+ wp_insert_post([
679
+ 'post_title' => $answer['title'],
680
+ 'post_name' => $answer['slug'],
681
+ 'post_content' => $answer['content'],
682
+ 'post_status' => 'publish',
683
+ 'post_type' => 'page',
684
+ 'post_parent' => $knowledge_id,
685
+ ]);
686
+ }
687
+ }
688
+ }
689
+
690
+ echo "AKA pages generated!";
691
+ flush_rewrite_rules();
692
+ ```
693
+
694
+ ### Step 6.4: Run Generator
695
+ ```bash
696
+ http://localhost:8080/wp-content/themes/[theme]/generate-aka.php
697
+ ```
698
+
699
+ ---
700
+
701
+ ## Phase 7: Internal Linking & Navigation
702
+
703
+ ### Step 7.1: Update Header Navigation
704
+ ```
705
+ [Logo] [Services ▼] [Guides ▼] [Locations] [Learn] [Contact]
706
+ | |
707
+ | +-- Guide 1
708
+ | +-- Guide 2
709
+ | +-- Guide 3
710
+ | +-- Guide 4
711
+ | +-- Guide 5
712
+ |
713
+ +-- Service 1
714
+ +-- Service 2
715
+ +-- Service 3
716
+ +-- Service 4
717
+ +-- Service 5
718
+ ```
719
+
720
+ ### Step 7.2: Update Footer
721
+ Include sections for:
722
+ - Service links
723
+ - Location links (popular cities)
724
+ - Guide links
725
+ - Company info
726
+ - Contact info
727
+
728
+ ### Step 7.3: Verify Internal Linking
729
+ Check that:
730
+ - Every page is reachable within 3 clicks from homepage
731
+ - Hub pages link to all child pages
732
+ - Child pages link back to hubs
733
+ - Related content links exist
734
+
735
+ ---
736
+
737
+ ## Phase 8: Quality Checks
738
+
739
+ ### Step 8.1: Page Count Verification
740
+ ```
741
+ Target:
742
+ - Location Pages: ~18
743
+ - Service+Location: ~90 (services × locations)
744
+ - FAQ Pages: ~17
745
+ - Comparison Pages: ~5
746
+ - AKA Authority: 5
747
+ - AKA Knowledge: ~75
748
+ - AKA Answer: ~120
749
+
750
+ Total: ~330 pages
751
+ ```
752
+
753
+ ### Step 8.2: Test Key Pages
754
+ - [ ] Homepage loads correctly
755
+ - [ ] All navigation links work
756
+ - [ ] Hub pages display child links
757
+ - [ ] Individual pages have proper content
758
+ - [ ] Mobile responsive
759
+ - [ ] Images load (or placeholders)
760
+
761
+ ### Step 8.3: SEO Verification
762
+ - [ ] Each page has unique title
763
+ - [ ] Meta descriptions present
764
+ - [ ] H1 tags correct
765
+ - [ ] Internal links functioning
766
+ - [ ] No 404 errors
767
+
768
+ ---
769
+
770
+ ## Phase 9: Export & Delivery
771
+
772
+ ### Step 9.1: Export Database
773
+ ```bash
774
+ docker exec ${CLIENT_NAME}-db mysqldump -u wordpress -pwordpress wordpress > ${CLIENT_NAME}-database.sql
775
+ ```
776
+
777
+ ### Step 9.2: Create URL-Replaced Database
778
+ ```bash
779
+ # Replace localhost with client domain
780
+ sed 's|http://localhost:8080|https://clientdomain.com|g' ${CLIENT_NAME}-database.sql > ${CLIENT_NAME}-database-production.sql
781
+ ```
782
+
783
+ ### Step 9.3: Zip Theme
784
+ ```bash
785
+ cd wp-content/themes
786
+ zip -r ${CLIENT_NAME}-theme.zip ${CLIENT_NAME}-theme/
787
+ ```
788
+
789
+ ### Step 9.4: Create Delivery Package
790
+ ```
791
+ delivery/
792
+ ├── ${CLIENT_NAME}-database-production.sql
793
+ ├── ${CLIENT_NAME}-theme.zip
794
+ ├── INSTALL-INSTRUCTIONS.md
795
+ └── login-credentials.txt
796
+ ```
797
+
798
+ ### Step 9.5: Installation Instructions
799
+ ```markdown
800
+ # Installation Instructions
801
+
802
+ ## 1. Upload Theme
803
+ 1. Go to wp-admin → Appearance → Themes
804
+ 2. Click "Add New" → "Upload Theme"
805
+ 3. Upload ${CLIENT_NAME}-theme.zip
806
+ 4. Activate the theme
807
+
808
+ ## 2. Import Database
809
+ Option A: phpMyAdmin
810
+ 1. Go to phpMyAdmin
811
+ 2. Select your database
812
+ 3. Click Import
813
+ 4. Upload ${CLIENT_NAME}-database-production.sql
814
+
815
+ Option B: Command Line
816
+ ```bash
817
+ mysql -u username -p database_name < ${CLIENT_NAME}-database-production.sql
818
+ ```
819
+
820
+ ## 3. Update wp-config.php
821
+ Make sure database credentials match your hosting.
822
+
823
+ ## 4. Flush Permalinks
824
+ 1. Go to Settings → Permalinks
825
+ 2. Don't change anything, just click Save
826
+
827
+ ## 5. Verify
828
+ - Visit homepage
829
+ - Check a few pages
830
+ - Test navigation
831
+ ```
832
+
833
+ ---
834
+
835
+ ## Phase 10: Hosting Setup (If Managing)
836
+
837
+ ### Option A: Client's Existing Hosting
838
+ Provide the delivery package and instructions.
839
+
840
+ ### Option B: We Set Up Hosting (SiteGround Recommended)
841
+ 1. Purchase hosting plan for client
842
+ 2. Point domain to SiteGround
843
+ 3. Install WordPress via Site Tools
844
+ 4. Upload theme
845
+ 5. Import database
846
+ 6. Configure SSL
847
+ 7. Test thoroughly
848
+
849
+ ---
850
+
851
+ ## Checklist Summary
852
+
853
+ ### Pre-Build
854
+ - [ ] GMB link received
855
+ - [ ] Business info extracted
856
+ - [ ] Services and prices confirmed
857
+ - [ ] Target cities identified
858
+ - [ ] Brand colors/fonts decided
859
+
860
+ ### Build
861
+ - [ ] Docker environment running
862
+ - [ ] WordPress installed
863
+ - [ ] Theme created with brand
864
+ - [ ] SEO data files created
865
+ - [ ] 130 programmatic SEO pages generated
866
+ - [ ] 200 AKA pages generated
867
+ - [ ] Navigation updated
868
+ - [ ] Footer updated
869
+ - [ ] All links verified
870
+
871
+ ### Delivery
872
+ - [ ] Database exported with production URLs
873
+ - [ ] Theme zipped
874
+ - [ ] Installation instructions created
875
+ - [ ] Client credentials documented
876
+ - [ ] Delivery package sent
877
+
878
+ ---
879
+
880
+ ## Time Estimates
881
+
882
+ | Phase | Time |
883
+ |-------|------|
884
+ | Server/Project Setup | 30 min |
885
+ | Gather Info & Research | 1-2 hrs |
886
+ | Theme Development | 2-3 hrs |
887
+ | SEO Data Creation | 1-2 hrs |
888
+ | Page Generation | 30 min |
889
+ | QA & Testing | 1-2 hrs |
890
+ | Export & Package | 30 min |
891
+ | **Total** | **6-10 hours** |
892
+
893
+ With practice, this can be done in **4-6 hours**.
894
+
895
+ ---
896
+
897
+ ## Common Issues & Solutions
898
+
899
+ ### Pages Show 404
900
+ → Flush permalinks: Settings → Permalinks → Save
901
+
902
+ ### Docker Won't Start
903
+ → Check if port 8080 is in use: `lsof -i :8080`
904
+
905
+ ### Database Import Fails
906
+ → Increase max upload in php.ini or split SQL file
907
+
908
+ ### Images Missing
909
+ → Check image paths in database, use placeholder service
910
+
911
+ ### Slow Site
912
+ → Install caching plugin, optimize images
913
+
914
+ ---
915
+
916
+ ## Notes
917
+
918
+ - Always test on staging before production
919
+ - Keep backups of everything
920
+ - Document any customizations
921
+ - Client communication is key
922
+
923
+ ---
924
+
925
+ *Created for [Your Agency Name]*
926
+ *Version 1.0 - February 2026*